import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-02
 * Time:16:54
 */
public class Text {
    public static void main(String[] args) {
        String fw="abcdefg";
        int[] array=new int[10];
        int i=0;
        for(int t:array)
        {
            array[i]=i;
            i++;
        }
        String b= Arrays.toString(array);
        System.out.println(b);
        System.out.println("---------------------");
        int c=0;
        int num=9;
        int[] kk=new int[6];
        int k[]={2,3,4,5,1};
        Arrays.sort(k);
        System.out.println(Arrays.toString(k));
        System.out.println(Arrays.binarySearch(k,2));
        System.out.println("----------------------");

        String ww="汤-琦-聪-明-机-智-勇敢--厉害";
        int r=ww.length();
            System.out.println(ww.indexOf("琦"));
            int ee=0;
        System.out.println(ww.indexOf("聪", ee));
        String[] wd=ww.split("-");
        System.out.println(Arrays.toString(wd));
        String cc="";
        StringBuffer sr=new StringBuffer();
        for(String t:wd)
        {
            sr.append(t);
        }
         cc=sr.toString();
        System.out.println(cc);
    }
}